testatcontext: Use the new debug flag
authorMatthias Clasen <mclasen@redhat.com>
Fri, 17 Jul 2020 14:36:43 +0000 (10:36 -0400)
committerEmmanuele Bassi <ebassi@gnome.org>
Sun, 26 Jul 2020 19:31:15 +0000 (20:31 +0100)
Only dump a11y state if GTK_DEBUG=accessibility is set.

gtk/gtktestatcontext.c

index b7eb29b6425ece2db625f14dff28d85a1bed7a41..550e49d9587e6d782d2be787ed50b7cccffecc42 100644 (file)
@@ -23,7 +23,9 @@
 #include "gtktestatcontextprivate.h"
 
 #include "gtkatcontextprivate.h"
+#include "gtkdebug.h"
 #include "gtkenums.h"
+#include "gtkprivate.h"
 #include "gtktypebuiltins.h"
 
 struct _GtkTestATContext
@@ -53,15 +55,16 @@ gtk_test_at_context_state_change (GtkATContext                *self,
   char *properties_str = gtk_accessible_attribute_set_to_string (properties);
   char *relations_str = gtk_accessible_attribute_set_to_string (relations);
 
-  g_print ("*** Accessible state changed for accessible ā€œ%sā€, with role %d:\n"
-           "***     states = %s\n"
-           "*** properties = %s\n"
-           "***  relations = %s\n",
-           G_OBJECT_TYPE_NAME (accessible),
-           role,
-           states_str,
-           properties_str,
-           relations_str);
+  GTK_NOTE(A11Y,
+   g_print ("*** Accessible state changed for accessible ā€œ%sā€, with role %d:\n"
+            "***     states = %s\n"
+            "*** properties = %s\n"
+            "***  relations = %s\n",
+             G_OBJECT_TYPE_NAME (accessible),
+            role,
+            states_str,
+            properties_str,
+            relations_str));
 
   g_free (states_str);
   g_free (properties_str);